﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using global::TerhelesEloszto.Common;

namespace Presentation
{
	public partial class _Default : System.Web.UI.Page
	{
		global::TerhelesEloszto.Engine.IEngine engine = global::TerhelesEloszto.Engine.Engine.Instance();

		protected void Page_Load( object sender, EventArgs e )
		{
			try
			{
				String visitorName = User.Identity.Name;
				if( engine.IsAdmin( visitorName ) )
				{
					Response.Redirect( "~/Admin/AdminDefault.aspx" );
				}
				else if( engine.IsTeacher( visitorName ) )
				{
					Response.Redirect( "~/Teacher/TeacherDefault.aspx" );
				}

			}
			catch( Exception ex )
			{
			}
		}
	}
}
